package io.gitee.vexlife.snake;

public class GameAgentInvoker implements Runnable {
	private IAgent agent;

	public GameAgentInvoker() {
		super();
	}

	public GameAgentInvoker(IAgent agent) {
		super();
		this.setAgent(agent);
	}

	@Override
	public void run() {
		if(this.agent != null) this.agent.step();
	}

	public IAgent getAgent() {
		return agent;
	}

	public void setAgent(IAgent agent) {
		this.agent = agent;
	}

}
